Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@chris-belcher
chris-belcher / work-diary.md
Last active April 6, 2026 21:57
Chris Belcher work diary
#!/usr/bin/env bash
set -euo pipefail
# patch-claude-code.sh — Rebalance Claude Code prompts to fix corner-cutting behavior
#
# What this does:
# Patches the npm-installed @anthropic-ai/claude-code cli.js to rebalance
# system prompt instructions that cause the model to cut corners, simplify
# excessively, and defer complicated work.
#
@jeffacce
jeffacce / diffusion_cfg.py
Last active April 6, 2026 21:56
Diffusion in 100 lines
# Classifier-free guidance diffusion on a toy spiral dataset
# Trains and infers a diffusion model on CPU, and generates a diffusion video
import io
import torch
import torchvision
import numpy as np
from torch import nn
from tqdm import tqdm
import matplotlib.pyplot as plt
@benvanik
benvanik / hypothesis.md
Last active April 6, 2026 21:55
Anthropic Thinking Reduction

Extended Thinking Is Load-Bearing for Senior Engineering Workflows

Produced by claude based on my extensive data - if there's any issues, it's because anthropic doesn't let claude think anymore ;) Unfortunately claude deleted my January logs containing a bulk of my work so only summary analysis is available - January was what I expect, Febuary started sliding, and March was a complete and utter loss.

Summary

Quantitative analysis of 17,871 thinking blocks and 234,760 tool calls across 6,852 Claude Code session files reveals that the rollout of thinking content redaction (redact-thinking-2026-02-12) correlates precisely with a measured quality regression in complex, long-session engineering workflows.

@markknol
markknol / shadertoy.md
Last active April 6, 2026 21:54
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@kieranklaassen
kieranklaassen / token_analysis.py
Created April 6, 2026 20:24
Claude Code token usage analyzer - breaks down usage by project, session, and subagent
#!/usr/bin/env python3
"""
Claude Code token usage analyzer.
Analyzes ~/.claude/projects/ JSONL files for token usage patterns.
"""
import json
import os
import sys
from pathlib import Path